keyboard/ime this topic describes how your application can receive input from a physical keyboard or a virtual keyboard ime the user can interact with your application by entering text with a virtual keyboard ime when an input or textarea element in your application is focused, the virtual keyboard is shown the user can also connect a physical keyboard to the tv to enter text more conveniently when a physical keyboard is connected, the ime is automatically hidden by pressing any key on the physical keyboard ime layout ime support two layouts of qwerty and abc if input type is email and password, use the qwerty style layout otherwise, use the abc style layout notethe abc style layout is supported from 2022 products with tizen 6 5 before 2022 products upto tizen 6 0, use qwerty layout only after 2022 products, use qwerty layout and abc style layout products qwerty layout abc layout ~ 2021 upto tizen 6 0 yes no 2022 ~ since tizen 6 5 yes yes table 1 ime layout support table ime floating style the ime floating style is disabled by default it is supported starting from 2022 products since tizen 6 5 enable ime floating style <tizen metadata key="http //samsung com/tv/metadata/use conformant" value="floating"/> ime return key for email/number/password/tel/url/text input type,use “done” as the default return key when these input element is in form tag, use “go” as return key for password input type with minlength attributes, the initial ime return key “done” or “go” is disabled; and until the input text length meet minlength, the ime return key been enabled <input type ="password" minlength=6> for search input type, use search icon as the return key for textarea tag and contenteditable attributes, use “go” as the return key ime enable/disable using ime to interacts with the application is enabled by default but if application want to disable it, application can set as the table disbale ime method <tizen metadata key="http //samsung com/tv/metadata/use ime" value="false"/> disbale ime only when non-user action method <tizen metadata key="http //samsung com/tv/metadata/use keypad without useraction" value="false"/> note disable ime method indicate no matter user action or non-user action, all can not show ime disable ime only when non-user action method indicate only when user action can show ime, such as press "enter" key on editable element by remote control, or click on the editable element by mouse when js set focus on editable element automatically, ime can not be shown ime show/hide scene ime show scene ime will be shown by user action, such as press on editable element by remote control or click on the editable element by mouse; also can be shown by non-user action the table lists the whole scene of ime show input device operation to show ime remote control press “enter” key on the input element by remote control mouse click on the input element by mouse js js set focus to the input element table 2 ime show scene table ime hide scene ime will be hidded by user action, such as press the “back” key on remote control or press the “done” key on ime, also can be hidden by non-user action the table lists the whole scene of ime hide input device operation to hide ime remote control when ime shows, press “done”/“go”/“search” key on ime panel by remote control when ime shows, press “back” key on remote control when ime shows, move the focus on the top of ime, then press “up” key on remote control keyboard when ime shows, connect a physical keyboard, and press any key on the physical keyboard mouse when ime shows, click “done”/“go”/“search” key on ime panel by mouse when ime shows, click any uneditable element which out of ime js when ime shows, js change the current focused input element to uneditable or blur table 3 ime hide scene table notepressing "up" key on top of ime will hide ime” is supported from 2020 products before 2020 products pressing "up" key on top of ime, only deliver the “up” key event to webapp, will not take the initiative to hide ime after 2020 products pressing "up" key on the top of ime will hide ime and deliver the “cancel” key event to webapp press "up" key on top of ime handle as same as press "back" key by remote control products hide ime deliver key event to webapp ~ 2019 upto tizen 5 5 no deliver "up" key event 2020 ~ since tizen 6 0 yes deliver "cancel" key event table 4 press up key on top of ime behavior detecting keyboard and ime input keyboard and ime input is detected in much the same way as remote control input, except that you do not need to register individual keyboard and ime keys some of the keys on a physical keyboard correspond to keys on the tv remote control remote control key keyboard key arrowleft left arrowup up arrowright right arrowdown down enter enter back esc remote control key keyboard key smart hub f5 source f6 channellist f7 volumemute f8 volumedown f9 volumeup f10 channeldown f11 channelup f12 table 5 keyboard equivalents to remote control keys the keycode for most ime keys is 229, but special keys have unique keycode values ime keycode done 65376 cancel 65385 other keys 229 ime keycode left 37 up 38 right 39 down 40 ime keycode space 32 backspace 8 delete all 46 table 6 ime keycode values when a physical keyboard is connected, an input or textarea element is focused, and the ime is hidden, the physical keyboard acts in place of the ime and sends the ime keycode values for example, pressing "enter" on the keyboard sends the keycode for the ime "done" key, not the remote control "enter" key; pressing "esc" key on the keyboard sends the keycode for the ime "cancel" key, not the remote control "back" key notefrom 2021 products with tizen 6 0, ime layout without “cancel” key but in some scenarios, some key event will be handled as “cancel” key event for example, press “back” key on ime by remote control, or press “up” key on the top of ime by remote control, the “back” key and “up” key will be handled as “cancel” key handling the ime the ime is automatically shown when an input or textarea element is focused, and hidden when the element loses focus to handle the ime input, create listeners for the input element events the focus event is fired when the input element is focused the blur event is fired when the input element loses focus the change event is fired when the value of the input element changes <input id='input' type='text'> document getelementbyid 'input' addeventlistener 'focus', function { console log "input element is focused and ready to get user input " ; } ; document getelementbyid 'input' addeventlistener 'blur', function { console log "input element loses focus " ; } ; document getelementbyid 'input' addeventlistener 'change', function { console log "input element value is changed " ; } ; to retrieve the user input value var value = document getelementbyid 'input' value; console log value ; to close the ime when the "done" ime key, or the remote control "back" key, is clicked, listen for the appropriate keycode values you must also remove focus from the input element document body addeventlistener 'keydown', function event { switch event keycode { case 65376 // done document getelementbyid 'input' blur ; break; case 65385 // cancel document getelementbyid 'input' blur ; break; } } ; importantthe preventdefault method prevents the default action insert or delete text of the input element from triggering do not call the preventdefault method for the keydown event